import request from "@/utils/request";

export const apis = {
  add: (data) => {
    return request({
      url: "/temporary/staff/account/add",
      method: "post",
      data: data,
    }).then((res) => {
      return res;
    });
  },
  query: (params) => {
    return request({
      url: "/temporary/staff/account/list",
      method: "get",
      params: {
        ...params,
        queryFlag: 1,
      },
    });
  },
  queryFlag: (params) => {
    return request({
      url: "/temporary/staff/account/list",
      method: "get",
      params: {
        ...params,
        queryFlag: 2,
      },
    });
  },
  del: (row) => {
    return request({
      url: "/temporary/staff/account/delete",
      method: "delete",
      data: {
        id: row.id,
      },
    });
  },
  update: (data) => {
    return request({
      url: "/temporary/staff/account/edit",
      method: "put",
      data: data,
    });
  },
};

export const zyzs = {
  add: (data) => {
    return request({
      url: "/temporaryStaffAccountCertificate/add",
      method: "post",
      data: data,
    }).then((res) => {
      return res;
    });
  },
  query: (params) => {
    return request({
      url: "/temporaryStaffAccountCertificate/list",
      method: "get",
      params,
    });
  },

  del: (row) => {
    return request({
      url: "/temporaryStaffAccountCertificate/delete",
      method: "delete",
      data: {
        id: row.id,
      },
    });
  },
  update: (data) => {
    return request({
      url: "/temporaryStaffAccountCertificate/edit",
      method: "put",
      data: data,
    });
  },
};
